﻿import { layout } from '@/app';

const pathgen = (pathnow: string) => {
  return process.env.NODE_ENV === 'production'
    ? 'https://juyou.js-beyond.com:39443/workManage/#/ant-design-pro' + pathnow
    : pathnow;
  // return 'https://juyou.js-beyond.com:39443/workManage/#/ant-design-pro' + pathnow;
};
export default [
  {
    path: '/403',
    component: './403',
    key: 'noauth',
    layout: false,
  },
  {
    path: '/user',
    layout: false,
    key: 'user',
    routes: [
      {
        name: 'login',
        path: '/user/login',
        component: './user/Login',
        key: 'userLogin',
      },
      {
        component: './404',
      },
    ],
  },

  {
    path: '/',
    name: '首页',
    icon: 'home',
    key: 'home',
    routes: [
      {
        path: '/menu2',
        name: '测试页面',
        icon: 'solution',
        key: 'menu2',
        component: './testreact',
        layout: false,
      },
      {
        path: '/menu1',
        name: '测试页面',
        icon: 'solution',
        key: 'menu2',
        component: './testreact',
        layout: false,
      },
    ],
  },
];

// let arr = [];
// let newarr = [];
// arr[0].children.map((e) => {
//   newarr.push({
//     path: '/admin/business/' + e.href,
//     name: e.name,
//     icon: 'solution',
//     access: 'normalRouteFilter',
//     component: './gptChats',
//     key: e.href,
//   });
// });
